package com.ly.heart.service.impl;

import java.util.List;
import com.ly.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.ProjectBudgetDetailEntityMapper;
import com.ly.heart.domain.ProjectBudgetDetailEntity;
import com.ly.heart.service.IProjectBudgetDetailEntityService;

/**
 * 项目预算分项明细Service业务层处理
 *
 * @author cxl
 * @date 2024-05-14
 */
@Service
public class ProjectBudgetDetailEntityServiceImpl implements IProjectBudgetDetailEntityService
{
    @Autowired
    private ProjectBudgetDetailEntityMapper projectBudgetDetailEntityMapper;

    /**
     * 查询项目预算分项明细
     *
     * @param id 项目预算分项明细主键
     * @return 项目预算分项明细
     */
    @Override
    public ProjectBudgetDetailEntity selectProjectBudgetDetailEntityById(String id)
    {
        return projectBudgetDetailEntityMapper.selectProjectBudgetDetailEntityById(id);
    }

    /**
     * 查询项目预算分项明细列表
     *
     * @param projectBudgetDetailEntity 项目预算分项明细
     * @return 项目预算分项明细
     */
    @Override
    public List<ProjectBudgetDetailEntity> selectProjectBudgetDetailEntityList(ProjectBudgetDetailEntity projectBudgetDetailEntity)
    {
        return projectBudgetDetailEntityMapper.selectProjectBudgetDetailEntityList(projectBudgetDetailEntity);
    }

    /**
     * 新增项目预算分项明细
     *
     * @param projectBudgetDetailEntity 项目预算分项明细
     * @return 结果
     */
    @Override
    public int insertProjectBudgetDetailEntity(ProjectBudgetDetailEntity projectBudgetDetailEntity)
    {
        projectBudgetDetailEntity.setCreateTime(DateUtils.getNowDate());
        return projectBudgetDetailEntityMapper.insertProjectBudgetDetailEntity(projectBudgetDetailEntity);
    }

    /**
     * 修改项目预算分项明细
     *
     * @param projectBudgetDetailEntity 项目预算分项明细
     * @return 结果
     */
    @Override
    public int updateProjectBudgetDetailEntity(ProjectBudgetDetailEntity projectBudgetDetailEntity)
    {
        return projectBudgetDetailEntityMapper.updateProjectBudgetDetailEntity(projectBudgetDetailEntity);
    }

    /**
     * 批量删除项目预算分项明细
     *
     * @param ids 需要删除的项目预算分项明细主键
     * @return 结果
     */
    @Override
    public int deleteProjectBudgetDetailEntityByIds(String[] ids)
    {
        return projectBudgetDetailEntityMapper.deleteProjectBudgetDetailEntityByIds(ids);
    }

    /**
     * 删除项目预算分项明细信息
     *
     * @param id 项目预算分项明细主键
     * @return 结果
     */
    @Override
    public int deleteProjectBudgetDetailEntityById(String id)
    {
        return projectBudgetDetailEntityMapper.deleteProjectBudgetDetailEntityById(id);
    }
}
